<?php 
        
        $status = $tally_in->getStatus()?  $tally_in->getStatus()  : 0;
?>
<!--Chua cac action cua TallyIn -->
<td>
<ul class="sf_admin_td_actions">
   <li>
    <?
        if ($status == CommonValues::$gTLStatus['key']['Published'] &&  $sf_user->hasCredential('EDIT_TALLYIN'))
            echo link_to(image_tag('/sf/sf_admin/images/date.png', array('alt' => __('Change Date'), 'title' => __('Change Date'))), 'tallyin/ChangeDate?id='.$tally_in->getId());
    ?>
 </li>
  <li><?php 
  echo link_to(image_tag('/sf/sf_admin/images/edit.png', array('alt' => __('change no'), 'title' => __('change no'))), 'tallyin/changeNumber?id='.$tally_in->getId());
  
  if ($status==0) echo link_to(image_tag('/sf/sf_admin/images/delete_icon.png', array('alt' => __('delete'), 'title' => __('delete'))), 'tallyin/delete?id='.$tally_in->getId(), array (
  'post' => true,
  'confirm' => __('Are you sure you want to delete?'),
)); else
    {
      if ($sf_user->hasGroup('Administrator')) {
          echo link_to(image_tag('/sf/sf_admin/images/delete_icon.png', array('alt' => __('delete'), 'title' => __('delete'))), 'tallyin/delete?id='.$tally_in->getId(), array (
        'post' => true,
        'confirm' => __('Are you sure you want to delete this Tally-IN?'),
));
      }
      echo link_to(image_tag('/sf/sf_admin/images/revise_icon.png', array('alt' => __('revise'), 'title' => __('revise'))), 'tallyin/revise?id='.$tally_in->getId(), array (
        'post' => true,
        'confirm' => __('Are you sure you want to revise this TallyIn?'),
));
    }
    ?></li>

<li>
  <?php 
        if ($status== CommonValues::$gTLStatus['key']['Published']) {
            //echo image_tag('/sf/sf_admin/images/completed_icon.png', array('alt' => __('published'), 'title' => __('published')));
        } else {
            echo link_to(image_tag('/sf/sf_admin/images/publish_icon.png', array('alt' =>'publish', 'title' => 'publish')), 'tallyin/publish?id='.$tally_in->getId(), array (
  'post' => true,
  'confirm' => __('Are you sure you want to publish?'),));
        }
    ?>
    </li>
<li>
<?
        if ($status == CommonValues::$gTLStatus['key']['Published'])
            echo link_to(image_tag('/sf/sf_admin/images/print.png', array('alt' => __('print'), 'title' => __('print'))), 'tallyin/print?id='.$tally_in->getId());
    ?>
</li>


</ul>
</td>
